<admintpl file="header" />
</head>
<body class="J_scroll_fixed">
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('News/findList')}">新闻列表</a></li>
			<li><a href="{:U('News/addNews')}">添加新闻</a></li>
		</ul>

		<form class="well form-search" method="post" action="{:U('News/findList')}">
			<div class="search_type cc mb10">
				<div class="mb10">
					<span class="mr20">
						标题： 
						<input type="text" name="name" style="width: 200px;"  placeholder="请输入新闻标题...">
						<input type="submit" name="submit" class="btn btn-primary" value="搜索" />
					</span>
				</div>
			</div>
		</form>
		<php>
		$type = array("1"=>"新闻","2"=>"活动");
		$order = array("1"=>"置顶","2"=>"正常");
		</php>
		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th>标题</th>
						<th>是否置顶</th>
						<th>类型</th>
						<th>时间</th>
						<th width="150">管理操作</th>
					</tr>
				</thead>
				<foreach name="news" item="vo">
				<tr>
					<td>{$vo.title}</td>
					<td>{$order[$vo['is_top']]}</td>
					<td>{$type[$vo["type"]]}</td>
					<td>{:date('Y年m月d日  H:i',$vo['create_time'])}</td>
					<td>
					    <a href="{:U('Web/News/editNews',array('id'=>$vo['id']))}">修改</a> 
						<a href="{:U('Web/News/delNews',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a>
					</td>
				</tr>
				</foreach>
			</table>
			<div class="pagination">{$page}</div>

		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
		$(function() {

			$("#navcid_select").change(function() {
				$("#mainform").submit();
			});

		});
	</script>
</body>
</html>